<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@include file="/common-app/taglibs.jsp"%>

<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInformation1" cellspacing="1">
	<col style="width:15%"/>
	<col style="width:35%"/>
	<col style="width:30%"/>
	<col style="width:20%"/>
	<tr> 
		<td colspan="4" class="t_bar2"><span class="color_red">*</span>候选人姓名或组织名称</td>
	</tr>
	<tr class="li_1">
		<td align="right">母语：</td>
		<td colspan="2"><input type="text" label="母语"  name="proposal/language_mother" style="text-align:left; width: 70%;" maxlength="500" value="<x:out select="$xmlData/data/proposal/language_mother"/>"/>(限500个字)</td>
		
		<td rowspan="3" style="vertical-align: center;padding: 0px;">
  			 <div id="uploadsuccess8" style="width: 125px;margin-top: 10px; " align="right">
		  			<c:set var="file_code8"><x:out select="$xmlData/data/content/file_code8" /></c:set>
					   <c:choose>
					 	 <c:when test="${file_code8==''}">
					       <img id="orgphotoImg" src="${res_app}/images/app/photo_01.jpg"  style="width:96px;height:125px" />
					 	</c:when>
					 	<c:otherwise>
					       <img id="orgphotoImg" src="${ctx}/file/ajax-filedownload?fileCode=<x:out select="$xmlData/data/content/file_code8" />"  style="width:96px;height:125px;" />
					 	</c:otherwise>
					  </c:choose>
				     <br/>
				  <div align="center">
				     <a href="#" style="cursor: pointer;" onclick="cilckFile('org')"><span style="color: blue; margin-left: 10px;" >[上传照片]</span></a><BR />
				  </div>
			</div> 
			<div id="file8" style="text-align:center">
				<input type="hidden" name="content/file_code8" id="content_file_code8"  value="<x:out select="$xmlData/data/content/file_code8" />" />
			</div>
		</td>
	</tr>
	
	<tr class="li_2">
		<td align="right">英文：</td>
		<td colspan="2"><input type="text" label="英文" class="required" name="proposal/language_english" style="text-align:left; width: 70%;" maxlength="500" value="<x:out select="$xmlData/data/proposal/language_english"/>"/>(限500个字)</td>
	</tr>
	<tr class="li_1">
		<td align="right">中文：</td>
		<td colspan="2"><input id="language_chinese" type="text" label="中文" onchange="accident();" class="required" name="proposal/language_chinese" style="text-align:left; width: 70%;" maxlength="100" value="<x:out select="$xmlData/data/proposal/language_chinese"/>"/>(限100个字)
		<input type="hidden" id="language_chinese3" name="proposal/zh_title" value="<x:out select="$xmlData/data/proposal/language_chinese"/><x:out select="$xmlData/data/proposal/sub_grant_name"/>"/>
		<input type="hidden" id="language_chinese1" value="<x:out select="$xmlData/data/proposal/sub_grant_name"/>"/>  
		</td>
	
	</tr>
	
	
</table>
<br>
<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInformation2" cellspacing="1">
	<col style="width:15%"/>
	<col style="width:18%"/>
	<col style="width:10%"/>
	<col style="width:23%"/>
	<col style="width:13%"/>
	<col style="width:23%"/>
	<tr> 
		<td colspan="6" class="t_bar2"><span class="color_red">*</span>个人信息</td>
	</tr>
	
	<tr class="li_2">
		<td align="right">出生年月：</td>
		<td>
		 	<c:set var="birth_date"><x:out select="$xmlData/data/proposal/birth_date" /></c:set>
			<cpt:date id="birth_date" name="proposal/birth_date" value="${birth_date}" className="required date beforeToday" label="出生年月" ></cpt:date>
	   </td>
	   
	   <td align="right">性别：</td>
		 <td style="border:0px solid white;border-right:1px solid #B7D1E6;border-bottom:0px;" >
			<cpt:checkbox key="sex" name="gender"   repeatColumn="2" onClick="setRequired();" tagType="radio" width="30px" ></cpt:checkbox>
			<input type="hidden" id="gender" name="proposal/gender_value" class="required" label="性别" value="<x:out select="$xmlData/data/proposal/gender_value" />" >
			<input type="hidden" name="proposal/gender_name" value="<x:out select="$xmlData/data/proposal/gender_name" />">
		</td>
		<td align="right">国籍：</td>
		<td align="left">
       		<c:set var="nationality_value"><x:out select="$xmlData/data/proposal/nationality_value" /></c:set>
			<cpt:select id="nationality"  key="country"  value="${nationality_value}" onChange="initControlValue(this.id);" style="width:150px;"></cpt:select>
			<input type="hidden" id="nationality_value" name="proposal/nationality_value" class="required" value="${nationality_value}" label="国籍">
			<input type="hidden" name="proposal/nationality_name" value="<x:out select="$xmlData/data/proposal/nationality_name" />">
      	</td>
	</tr>
	
	<tr class="li_1">
		<td align="right">从事工作：</td>
		<td><input type="text" label="从事工作" class="required" name="proposal/job" style="text-align:left; width: 75%;" maxlength="100" value="<x:out select="$xmlData/data/proposal/job"/>"/></td>
		<td align="right">专业：</td>
		<td><input type="text" label="专业" class="required" name="proposal/main_profession" style="text-align:left; width: 60%;" maxlength="100" value="<x:out select="$xmlData/data/proposal/main_profession"/>"/></td>
		<td align="right">学位：</td>
		<td align="left">
			<c:set var="degree_value"><x:out select="$xmlData/data/proposal/degree_value" /></c:set>
			<cpt:select id="degree"  key="degree"  value="${degree_value}" onChange="initControlValue(this.id);" style="width:150px;"></cpt:select>
			<input type="hidden" id="degree_value" name="proposal/degree_value" class="required" value="${degree_value}" label="学位">
			<input type="hidden" name="proposal/degree_name" value="<x:out select="$xmlData/data/proposal/degree_name" />">
		</td> 	
	</tr>
	<tr class="li_2">
		<td align="right">行政职务：</td>
		<td><input type="text"  label="行政职务" class="required" name="proposal/company_administration" style="text-align:left; width: 75%;" maxlength="100" value="<x:out select="$xmlData/data/proposal/company_administration"/>"/></td>
		<td align="right">职称：</td>
		<td>
			<%-- <input type="text" label="职称" class="required" name="proposal/company_title" style="text-align:left; width: 90%;" maxlength="100" value="<x:out select="$xmlData/data/proposal/company_title"/>"/> --%>
			
		<c:set var="title_org">
		{'id':'<x:out select="$xmlData/data/proposal/title_org_value" />',
		'name':'<x:out select="$xmlData/data/proposal/title_org_name" />'
		}					
		</c:set> <cpt:tree id="title_org" key="prof_title"
				cacheable="false" className="hn_iuput_kuang required selectWidth3"
				readonly="true" value="${title_org}" label="职称"
				showPattern="all" shieldPattern="0"
				onClick="initTreeValue2_qhh">
			</cpt:tree> 
			<input type="hidden" name="proposal/title_org_value"
			value="<x:out select="$xmlData/data/proposal/title_org_value" />" /> 
			<input type="hidden" name="proposal/title_org_name"
			value="<x:out select="$xmlData/data/proposal/title_org_name" />" />
		</td>
		<td align="right">联系电话：</td>
		<td align="left"><input type="text" label="联系电话" class="required" style="text-align:left; width: 65%;" maxlength="40" name="proposal/phonenumber" value="<x:out select="$xmlData/data/proposal/phonenumber"/>"/></td>
	</tr>
	<tr class="li_1">
		<td align="right">通信地址：</td>
		<td ><input label="通信地址" type="text" class="required" style="text-align:left; width: 75%;" maxlength="100" name="proposal/mailing_address" value="<x:out select="$xmlData/data/proposal/mailing_address"/>"/></td>
		<td align="right">邮编：</td>
		<td><input type="text" label="邮编" class="required" style="text-align:left; width: 60%;" name="proposal/postcode" maxlength="6" onfocus="InitInput.setNumber(this,6,0,0)"value="<x:out select="$xmlData/data/proposal/postcode"/>"/></td>
		<td align="right">传真：</td>
		<td align="left"><input type="text" label="传真" class="required" style="text-align:left; width: 65%;" maxlength="100" name="proposal/fax" value="<x:out select="$xmlData/data/proposal/fax"/>"/></td>
	
	</tr>
</table>
<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInformation3" cellspacing="1">
	<col style="width:15%"/>
	<col style="width:18%"/>
	<col style="width:68%"/>
	<tr class="li_2">
		<td align="right" rowspan="2">工作单位：</td>
		<td align="right">中文：</td>
		<td align="left">
			<input type="text" label="工作单位(中文)" class="required" name="proposal/chinese_address" style="text-align:left; width: 70%;" maxlength="100" value="<x:out select="$xmlData/data/proposal/chinese_address"/>"/>(限100个字)
		</td>
	</tr>
	<tr class="li_1">
	<td align="right">英文：</td>
		<td align="left">
			<input type="text" label="工作单位(英文)" class="required" name="proposal/enlish_address" style="text-align:left; width: 70%;" maxlength="500" value="<x:out select="$xmlData/data/proposal/enlish_address"/>"/>(限500个字)
		</td>
	</tr>
</table>
<br>
<table class="t_css table01" width="100%" border="0" cellpadding="0" id="basicInformation4" cellspacing="1">
	<col style="width:15%"/>
	<col style="width:18%"/>
	<col style="width:15%"/>
	<col style="width:18%"/>
	<col style="width:16%"/>
	<col style="width:20%"/>
	<tr> 
		<td colspan="6" class="t_bar2"><span class="color_red">*</span>与省内合作单位信息</td>
	</tr>
	
	<tr class="li_2">
		<td align="right">与省内合作单位名称：</td>
		<td colspan="5">
			<input type="text" label="合作有关单位名称" class="required" style="text-align:left; width: 78%;" name="proposal/cooperator" maxlength="100" value="<x:out select="$xmlData/data/proposal/cooperator"/>"/>
		</td>
	</tr>
	<%-- <tr class="li_2">
		<td align="right">通信地址：</td>
		<td ><input label="通信地址" type="text" class="required" style="text-align:left; width: 90%;" maxlength="100" name="proposal/mailing_address" value="<x:out select="$xmlData/data/proposal/mailing_address"/>"/></td>
		<td align="right">邮编：</td>
		<td><input type="text" label="邮编" class="required" style="text-align:left; width: 75%;" name="proposal/postcode" maxlength="10" value="<x:out select="$xmlData/data/proposal/postcode"/>"/></td>
		<td align="right">联系电话：</td>
		<td><input type="text" label="联系电话" class="required" style="text-align:left; width: 75%;" maxlength="15" name="proposal/phonenumber" value="<x:out select="$xmlData/data/proposal/phonenumber"/>"/></td>
	</tr> --%>
	<tr class="li_1">
		<%-- <td align="right">传真：</td>
		<td><span><input type="text" label="传真" class="required" style="text-align:left; width: 90%;" maxlength="100" name="proposal/fax" value="<x:out select="$xmlData/data/proposal/fax"/>"/></span></td> --%>
		<td align="right">合作开始时间：</td>
		<td colspan="2">
		 	<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
			<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className=" required date   dateCompare:end_date " label="合作开始时间" ></cpt:date>
	   </td>
	   <td align="right">合作结束时间：</td>
	   <td colspan="2">
	    	<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
			<cpt:date id="end_date" name="proposal/end_date" value="${end_date}" className=" required date" label="合作结束时间" ></cpt:date> 
	   </td>
	</tr>
	<tr class="li_2">
		<td align="right">推荐单位：</td>
		<td colspan="5">
		 <c:set var="recomend_org">
		{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />',
		'name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'
		}					
		</c:set> <cpt:tree id="recomend_org" key="recommended_org"
				cacheable="false" className="hn_iuput_kuang required selectWidth3"
				readonly="true" value="${recomend_org}" label="推荐单位"
				showPattern="all" shieldPattern="0"
				onClick="initTreeValue2_qhh">
			</cpt:tree> <input type="hidden" name="proposal/recomend_org_value"
			value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" />
			<input type="hidden" name="proposal/recomend_org_name"
			value="<x:out select="$xmlData/data/proposal/recomend_org_name" />" /> 
		</td>
	</tr>
</table>
<br>
<script>
function cilckFile(flag){
	var fileCode = $('#content_file_code8').val();
	if(fileCode!=""){
		tb_show("上传照片", "<c:out value="${ctx}"/>/proposal/edit/psn/updatePhoto?fileCode="+fileCode+"&flag="+flag+"&TB_iframe=true&height=250&width=530", false);
	}else{
		
		tb_show("上传照片", "<c:out value="${ctx}"/>/proposal/edit/psn/updatePhoto?flag="+flag+"&TB_iframe=true&height=250&width=530", false);
	}
}
function accident(){
	var language_chinese = $('#language_chinese').val();
	var language_chinese1 = $('#language_chinese1').val();
	$('#language_chinese3').val(language_chinese+language_chinese1);
	
}

</script>
<script type="text/javascript">
function initTreeValue2_qhh(treeId, treeNode) {
  	//针对单位性质
  	if (( treeNode && treeNode.isParent)) {
		scmWarn("请选择具体的"+$("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
			return false;
	}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
		$("#" + treeId).val(str);
		
	
		setInformation(treeNode.id);
	}

	function setInformation(re_org_code){
		
		if(re_org_code !=null){
		 $.ajax({
	         type: "post",
	         url: "${ctx}/proposal/get-reorg-contactinfo",
	         data: {re_org_code:re_org_code},
	         dataType: "json",
	         success: function(data){
	        	            /*   alert(JSON.stringify(data) );
	        	            alert(data.PNAME); */
	        	       if(data.PNAME == null || data.TEL == null || data.EMAIL == null || data.FAX == null){
	        	    	   irisValaddMsg("请联系相应的推荐单位完善单位信息");
	        	       }else{
	        	    	   $("#reco_lixiren").val(data.PNAME);
	                   $("#reco_mobile").val(data.TEL);
	                   $("#reco_email").val(data.EMAIL);
	                   $("#reco_fax").val(data.FAX);
	                   }
	                  }
	     });
		}
	}
</script>

























	